local duoquan = fk.CreateSkill {
  name = "water_duoquan",
  tags = { Skill.Limited },
}

Fk:loadTranslationTable{
  ["water_duoquan"] = "夺权",
  [":water_duoquan"] = "限定技，出牌阶段，你可以选择一名其他角色，弃置其所有手牌，然后你摸等量的牌并对其造成2点火焰伤害。",
  ["#water_duoquan_target"] = "请选择一名其他角色发动夺权",
}

duoquan:addEffect("active", {
  anim_type = "offensive",
  prompt = "#water_duoquan_target",
  card_num = 0,
  target_num = 1,
  target_filter = function(self, player, to_select, selected)
    return #selected == 0 and to_select ~= player
  end,
  can_use = function(self, player)
    return  player:usedSkillTimes(self.name,Player.HistoryGame)==0
  end,
  on_use = function(self, room, effect)
    local player = effect.from
    local target = effect.tos[1]
    local handcards = #target:getCardIds("h")
    if handcards > 0 then
      target:throwAllCards("h")
      player:drawCards(handcards)
    end
    room:damage({
      from = player,
      to = target,
      damage = 2,
      damageType = fk.FireDamage,
      skillName = self.name,
    })
  end,
})

return duoquan 